package com.atguigu.gmall.frign.product;
import com.atguigu.entity.BaseCategoryView;
import com.atguigu.entity.BaseSaleAttr;
import com.atguigu.entity.SkuImage;
import com.atguigu.entity.SkuInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
/**
 * 暴漏的远程调用接口
 */
@FeignClient("service-product")
public interface ProductApiClient {
    @GetMapping("api/product/inner/getSkuInfo/{skuId}") //inner表示内部资源 只给微服务内部使用
    public SkuInfo getSkuInfo(@PathVariable Long skuId);
        //根据SkuId查询该库存的商品信息
    @GetMapping("api/product/inner/getSkuImage/{skuId}")
    public List<SkuImage> getSkuImage(@PathVariable Long skuId);
        //根据skuId查询所有的Sku图片信息
    @GetMapping("api/product/inner/getPrice/{skuId}")
    public BigDecimal getPrice(@PathVariable Long skuId);
    @GetMapping("api/product/inner/getBaseCategoryView/{category3Id}")
    public BaseCategoryView getBaseCategoryView(@PathVariable Long category3Id );
    @GetMapping("api/product/inner/selectSpuSaleAttrListCheckBySku/{skuId}/{spuId}")
    public List<BaseSaleAttr> selectSpuSaleAttrListCheckBySku(@PathVariable Long skuId,
                                                              @PathVariable Long spuId);
    @GetMapping("api/product/inner/getSkuValueIdsMap/{spuId}")
    public Map getSkuValueIdsMap(@PathVariable ("spuId") Long spuId);
}
